package com.boot.mall.product.vo;

import com.boot.mall.product.entity.SkuImagesEntity;
import com.boot.mall.product.entity.SkuInfoEntity;
import com.boot.mall.product.entity.SpuInfoDescEntity;
import lombok.Data;
import org.springframework.context.annotation.Primary;

import java.io.Serializable;
import java.util.List;

@Data
public class SkuItemVo implements Serializable {

    // 1.获取Sku的基本信息 pms_sku_info
    private SkuInfoEntity info;
    // 2.sku的图片信息 pms_sku_images
    private List<SkuImagesEntity> images;
    // 3.获取spu的销售属性组合
    private List<SkuItemSaleAttr> saleAttrs;
    // 4.获取spu的介绍
    private SpuInfoDescEntity desc;
    // 5.获取spu的规格参数信息
    private List<SpuItemGroupAttr> groupAttrs;
    // 6.秒杀信息
    private SecKillVo secKillVo;

    @Data
    public static class SkuItemSaleAttr{
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuId> attrValues;

        @Data
        public static class AttrValueWithSkuId{
            private String attrValue;
            private String skuIds;
        }

    }
    @Data
    public static class SpuItemGroupAttr{
        private String groupName;
        private List<SpuBaseAttrVo> attrVos;
    }
    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }

}
